package com.panopset.gui.container;

import javax.swing.JTextField;

import com.panopset.TextScrambler;
import com.panopset.gui.TPasswordField;
import com.panopset.security.Encrypter;

/**
 * Panopset password field.
 *
 * @author Karl Dinwiddie
 *
 */
public final class PanPasswordField extends AbstractPanTextField {

    /**
     *
     * @param columns Number of columns.
     * @param borderTitle Border title.
     * @param toolTipText Tool tip text.
     * @param defaultValue Default value.
     */
    public PanPasswordField(final int columns, final String borderTitle,
            final String toolTipText, final String defaultValue) {
        super(columns, borderTitle, toolTipText, defaultValue);
    }

    @Override
    public JTextField createComponent() {
        return new TPasswordField(getColumns());
    }
    
//    private static final String Z = "NOTtooTerriblySecureButBetterThanNothing";
//    
//    @Override
//    protected String translateTo(String s) {
//    	return TextScrambler.scramble(s, Z);
//    }
//    
//    @Override
//    protected String translateFrom(String s) {
//    	if (s == null) {
//    		return null;
//    	}
//        return TextScrambler.unscramble(s, Z);
//    }
}
